
Part-1: Install and configure github bash on windows
Part-2: Clone github repository to local using bash | Copy github repo to local machine using bash
Part-3: Commit changes in github and push to repository using bash command | git Add, Commit, Push
Step 1:
- Watch my previous video[GitHub Part-2] and article[GitHub Part-2]
- Change any file inside your cloned repository into your directory.
Step 2:
- Open your bash command prompt.
- Know your current path by entering the below command
pwd
- After entering this “pwd” it will appear like below directory
/c/ Users/Desktop
- Go to your expected directory by entering below command
cd /c/Work
here I want to clone my repository project into “Work” folder.
- Write below code to add changes to commit
Example1: git add -A && git commit -m "This is first commit"
if you want to commit only one-file/one-file change then instead of Example1 use Example2.
Example2: git add indext.txt && git commit -m "This is first commit"
- Write below code to Push the added changes
Example: git push origin master
- Then a poup will open to provide your GitHub credentials.
- Then your changes will updated to your repository